Add commit job with quality checks workflow#165
Merged
Conversation
Adds a generalized commit workflow job to the library that enforces quality checks before every commit through git commit interception. The job includes: - Code review step (DRY, naming, test coverage) - Test execution step - Lint/format step - Commit and push step The README explains: - Why git commit is hijacked (to enforce the workflow) - How to configure the settings.json PreToolUse hook - Required placeholder replacements for test/lint commands https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Remove "view recent commit messages" step from commit_and_push.md - Create code_review_standards.example.md with review criteria - Update review.md to reference [code review standards path] placeholder - Update README with instructions for code review standards replacement The code review standards are now externalized to a separate file that users can customize for their project's specific requirements. https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Update review.md to have sub-agent read code review standards (not main agent) - Remove example sub-agent prompt from review.md - Remove language-specific test command examples from test.md - Split [lint and format command] into [format command] and [lint check command] - Remove example sub-agent prompt from lint.md - Update README with new placeholder descriptions https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
Add commit_job_git_commit.sh to the job folder so users can just copy it rather than creating from scratch. Update README instructions. https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Replace after_agent hooks with quality_criteria in job.yml - Remove "Sub-agent was used to conserve context" (implementation detail) - Remove "Test command was run" (redundant with "tests passing") - Remove promise tags from step files (handled by framework) - Simplify and align criteria between job.yml and step files https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Replace hooks.after_agent.prompt with quality_criteria in job.yml - Simplify quality criteria in step files (remove <promise> instructions) - Align with library/jobs/commit structure while keeping project-specific customizations (ruff, CHANGELOG guidance) https://claude.ai/code/session_01JfPmbjHD1JaRV95DY83nUr Co-authored-by: Claude <noreply@anthropic.com>
Add the git commit blocker hook script to the job folder so users can copy it during installation. Simplified README installation instructions to reference the included scripts rather than inline code. https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Add workflows section with 'full' workflow defining step sequence - Update block_bash_with_instructions.sh to output to stderr (matches upstream) - Improve regex pattern to anchor at start of command https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
Document the new job.yml schema fields: - workflows: Named sequences of steps - quality_criteria: Measurable criteria for step completion https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
- Add "Test Quality" section to code_review_standards.example.md - Tests should add value and verify distinct behaviors - Tests should not be duplicative of each other - Copy code review standards to doc/code_review_standards.md - Update .deepwork review.md to reference doc file instead of inline criteria https://claude.ai/code/session_01MKARbdLAGS4xcAoNQiNzkn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new
commitjob that implements a structured workflow for committing code changes with built-in quality checks. The job enforces a four-step process: code review, testing, linting, and commit/push, ensuring all code meets quality standards before reaching the repository.Key Changes
library/jobs/commit/job.yml): Defines the complete commit workflow with four sequential steps, each with clear inputs, outputs, dependencies, and quality verification hookslibrary/jobs/commit/readme.md): Includes overview, installation instructions, customization guide, and usage examplessteps/review.md: Code review using sub-agents to catch issues, DRY violations, naming problems, and missing testssteps/test.md: Test execution with iterative fixing until all tests passsteps/lint.md: Code formatting and linting using sub-agentssteps/commit_and_push.md: Final verification and commit/push with git commit wrapper scriptNotable Implementation Details
git commitcommands and redirect to the/commitskill, enforcing the workflowafter_agenthooks with verification prompts that require<promise>✓ Quality Criteria Met</promise>confirmationInstallation Requirements
Projects using this job must:
git commitand provide a wrapper for the commit job.claude/settings.jsondeepwork syncto generate slash commands